﻿@model Yeap.Models.WorkListItem

@{
    ViewBag.Title = "GetStudentList";
}

@using Yeap.Kernel.Utils.Enums;

@if ((Model.WorkType == WorkTypes.Completed || Model.WorkType == WorkTypes.InProgress || Model.WorkType == WorkTypes.PastYears ) && Model.Student!=null)
{
    @Model.Student.FullName
}
else
{
    if (Model.AssignedStudents.Count > 0)
    {
        <text>
            Подавшие заявку: <a class="collapsable-link" href="#">Показать</a> ( @Model.AssignedStudents.Count )
        </text>
    }
    <ul style="display:none;list-style-type:none;">
    @foreach (var workUser in Model.AssignedStudents)
    {
        <li>@workUser.LastName @workUser.FirstName</li>
    }
    </ul>
    
    if (Model.ProposedStudents.Count > 0)
    {
        <text>
            Приглашённые: <a class="collapsable-link" href="#">Показать</a> ( @Model.ProposedStudents.Count )
        </text>
    }
    <ul style="display:none;list-style-type:none;">
    @foreach (var workUser in Model.ProposedStudents)
    {
        <li>@workUser.LastName @workUser.FirstName</li>
    }
    </ul>
    
    if (Model.ProposedStudents.Count == 0 && Model.AssignedStudents.Count == 0)
    {
        <text>
            Претендентов нет.
        </text>
    }
}
    
